<template>
  <div class="item">
    <!-- 引入图标-->
    <i :class="iconstyle"></i>
    <slot></slot>
  </div>
</template>

<script setup>
import { computed } from 'vue';
const props = defineProps({
  icon: {
    type: String,
    default: '',
    required: true,
  },
});
// 图标样式
const iconstyle = computed(() => {
  return `fa-solid fa-${props.icon}`;
});
</script>

<style scoped>
.item {
  color: #666;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: center;
}
i {
  font-size: 30px;
}
</style>
